package com.ruoyi.apis.vo;

import com.ruoyi.apis.entity.VideoEntity;
import com.ruoyi.apis.utils.ResponseUtils;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.BeanUtils;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * @Author Choi
 * @Date 2021/8/23
 */

@Getter
@Setter
public class VideoVO {
    private Long id;
    private String name;
    private String video;
    private String description;
    private Date createTime;
    private Date updateTime;

    public VideoVO(VideoEntity videoEntity) {
        BeanUtils.copyProperties(videoEntity, this);
        this.setVideo(ResponseUtils.getFulImage(videoEntity.getVideo()));
    }
}
